home *** CD-ROM | disk | FTP | other *** search
/ Scene Storm / Scene Storm - Volume 1.iso / coding / c / amiexpress / source / ae / code / ax3.00 / chooseaname.c < prev    next >
Encoding:
C/C++ Source or Header  |  1980-01-03  |  819 b   |  33 lines

  1. #include "bbs.h"
  2.  
  3. int ChooseAName(char *s,struct User *hoozer,struct UserKeys *hoozer2,int lflag)
  4. {
  5. int stat;
  6. UWORD i;
  7.  
  8.  i=1;
  9.  do {
  10.      stat=Find_User_From_Name(i,s,hoozer,hoozer2);
  11.      if(stat==0) {
  12.          if(lflag)  AEPutStr("\r\nUser does not exist!!\r\n\r\n");
  13.          return(FAILURE);
  14.      }
  15.      if(stat=CheckForAst(s)) {
  16.          if(stat<4 || !GET_BIT(ACS_WILDCARDS)) return(FAILURE);
  17.          AEPutStr(" Expand: ");
  18.          AEPutStr(hoozer2->UserName);
  19.          AEPutStr(" Correct ");
  20.          stat=YesNo(1);
  21.          if(stat<0)          return(stat);
  22.          if(!stat) {
  23.              if(AnsiColor)    AEPutStr("A");
  24.              stat=1;
  25.              i=(hoozer2->Number)+1;
  26.          } else  stat=0;
  27.  
  28.      } else   stat=0;
  29.  } while(stat);
  30.  Load_Account(hoozer2->Number,hoozer,hoozer2);
  31.  return(1);
  32. }
  33.